package com.deodar.system.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MLKContext {

	private String sjbbh;
	private String dwmc;
	private String dwdm;
	private String xzqh;
	private String startTime;
	private String endTime;
	private String xmlSavePath;
	private String sjlx;
	SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
	
	public String getSjbbh(int fileNum) {
		if (sjbbh != null) {
			String today = sdf.format(new Date());
			if (today.equals(startTime.substring(0, 8))) {
				fileNum += Integer.parseInt(sjbbh);
			}
		}
		String num = "";
		if (fileNum < 10) {
			num = "00000" + fileNum;
		} else if (fileNum < 100) {
			num = "0000" + fileNum;
		} else if (fileNum < 1000) {
			num = "000" + fileNum;
		} else if (fileNum < 10000) {
			num = "00" + fileNum;
		} else if (fileNum < 100000) {
			num = "0" + fileNum;
		} else
			num = "" + fileNum;
		return dwdm + endTime.substring(0, 8) + num;
	}
	public void setSjbbh(String sjbbh) {
		this.sjbbh = sjbbh;
	}
	public String getDwmc() {
		return dwmc;
	}
	public void setDwmc(String dwmc) {
		this.dwmc = dwmc;
	}
	public String getDwdm() {
		return dwdm;
	}
	public void setDwdm(String dwdm) {
		this.dwdm = dwdm;
	}
	public String getXzqh() {
		return xzqh;
	}
	public void setXzqh(String xzqh) {
		this.xzqh = xzqh;
	}
	public String getStartTime() {
		return startTime;
	}
	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	public String getEndTime() {
		return endTime;
	}
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	public String getXmlSavePath() {
		return xmlSavePath;
	}
	public void setXmlSavePath(String xmlSavePath) {
		this.xmlSavePath = xmlSavePath;
	}
	public String getSjlx() {
		return sjlx;
	}
	public void setSjlx(String sjlx) {
		this.sjlx = sjlx;
	}
	
}
